<html>

<head>
<meta charset="UTF-8">
<title>部门管理</title>
</head>
<body>
	<#import "/page.ftl" as page />
	<#include "/head.ftl"/>
	<script type="text/javascript" src="/js/task.js"></script>
	<link rel="stylesheet" type="text/css" href="/css/task.css">
	<div class="content">
		<div class="tab">
			<div class="tab-header">
				<a title="刷新" class="btn btn-setting" onclick="refresh(this)">
					<i class="iconfont icon-refresh"></i>
				</a>
				<div class="tab-tool">
					<input class="key" type="text" placeholder="按任务名称查找...">
					<a  class="search-btn search-mytask">
						<i class="iconfont icon-search"></i>
					</a>
				</div>
			</div>
			<div class="tab-content">
				<div>
					<table style="width: 100%; border-collapse: collapse;">
						<tr>
							<th>类型</th>
							<th>标题</th>
							<th>发布时间</th>
							<th>发布人</th>
							<th>状态</th>
							<th>操作</th>
						</tr>
						<#if tasklist??>
						<#list (tasklist.content) as taskuser>
							<tr>
								<#list status['task_manage_type'] as status>
									<#if status.value==taskuser.task.type>
										<td><span class="btn" style="color:${(status.color)!''}" >${status.name}</span></td>		
									</#if>
								</#list>
								<td>${taskuser.task.tmTitle}</td>
								<td>${taskuser.task.tmPushTime?string("yyyy-MM-dd")}</td>
								<td>${taskuser.task.user.realName}</td>
									<#list status['task_manage_status'] as status>
										<#if status.value==taskuser.tmStatus>
											<td><span class="btn" style="background:${(status.color)!''}">${status.name}</span></td>		
										</#if>
									</#list>
								<td>
									<a href="/task/showmyTask?id=${taskuser.tuid}" title="查看任务" class="btn btn-look"><i class="iconfont icon-search"></i><span> 查看</span></a>
								</td>
							</tr>
						</#list>
						<#else>
							<tr><td colspan="7">没有人给你分享任务哦！！！</tr>
						</#if>
					</table>
				</div>
			</div>
			<!-- url:路径
				pager：分页对象
				color：分页按钮的颜色
				 -->
				 <#if tasklist??>
					<@page.page url=requestURI pager=tasklist/>
				</#if>
		</div>
	</div>
</body>
</html>